home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 1993
/
MacHack 1993.toast
/
Papers ‘93
/
Voice Toolkit
/
Voice Button
< prev
next >
Wrap
Text File
|
1993-04-24
|
1KB
|
43 lines
(in-package "VOICE-TOOLKIT")
(export '(voice-button initialize-instance))
(defclass voice-button (button-dialog-item)
((careful :accessor careful
:initarg :careful
:initform t)
(exclusive :accessor exclusive
:initarg :exclusive
:initform t)
(text-color :accessor text-color)
(text-font :accessor text-font)))
(defmethod text ((self voice-button))
(format nil "button ~a"
(dialog-item-text self)))
(defmethod select ((self voice-button))
(if (dialog-item-action self)
(funcall (dialog-item-action self))))
(defmethod mark ((self voice-button))
(if (numberp *mark-method*)
(progn
(setf (text-color self) (part-color self :text))
(set-part-color self :text *mark-method*))
(progn
(setf (text-font self) (view-font self))
(set-view-font self (list (first (view-font self)) *mark-method*)))))
(defmethod unmark ((self voice-button))
(if (numberp *mark-method*)
(set-part-color self :text (text-color self))
(set-view-font self (text-font self))))
(defmethod initialize-instance ((self voice-button) &rest args)
(apply #'call-next-method (cons self (make-voice-shell args))))
(defmethod identify ((self voice-button))
(file-voice-item self))